home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / gedit-2 / plugins / snippets / fortran.xml < prev    next >
Encoding:
Extensible Markup Language  |  2009-04-14  |  4.1 KB  |  165 lines

  1. <?xml version='1.0' encoding='utf-8'?>
  2. <snippets language="fortran">
  3.   <snippet id="c">
  4.     <text><![CDATA[character(len=${1:10}) :: $0]]></text>
  5.     <tag>c</tag>
  6.     <description>character</description>
  7.   </snippet>
  8.   <snippet id="cl">
  9.     <text><![CDATA[open(${1:unit}, status='${3:keep}')]]></text>
  10.     <tag>cl</tag>
  11.     <description>close</description>
  12.   </snippet>
  13.   <snippet id="do">
  14.     <text><![CDATA[do ${1:i}=$2, $3, ${4:1}
  15.     ${0:source}
  16. end do]]></text>
  17.     <tag>do</tag>
  18.     <description>do ... end do</description>
  19.   </snippet>
  20.   <snippet id="func">
  21.     <text><![CDATA[function ${1:name}( ${2:parameter} )
  22.     ${3:integer/real ::} $1
  23.     ${4:integer/real ::} $2
  24.     
  25.     ${0:source}
  26.     
  27.     $1 =     !result
  28. end function]]></text>
  29.     <tag>func</tag>
  30.     <description>function</description>
  31.   </snippet>
  32.   <snippet id="ifel">
  33.     <text><![CDATA[if( $1 ) then
  34.     ${2:source}
  35. else
  36.     ${0:source}
  37. end if]]></text>
  38.     <tag>ifel</tag>
  39.     <description>if ... else ... end if</description>
  40.   </snippet>
  41.   <snippet id="if">
  42.     <text><![CDATA[if( $1 ) then
  43.     ${0:source}
  44. end if]]></text>
  45.     <tag>if</tag>
  46.     <description>if ... end if</description>
  47.   </snippet>
  48.   <snippet id="i">
  49.     <text><![CDATA[integer(kind=${1:4}) :: $0]]></text>
  50.     <tag>i</tag>
  51.     <description>integer</description>
  52.   </snippet>
  53.   <snippet id="ida">
  54.     <text><![CDATA[integer(kind=${1:4}), dimension(${2::}), allocatable :: $0]]></text>
  55.     <tag>ida</tag>
  56.     <description>integerdimalloc</description>
  57.   </snippet>
  58.   <snippet id="id">
  59.     <text><![CDATA[integer(kind=${1:4}), dimension(${2::}) :: $0]]></text>
  60.     <tag>id</tag>
  61.     <description>integerdim</description>
  62.   </snippet>
  63.   <snippet id="l">
  64.     <text><![CDATA[logical(kind=${1:1}) :: $0]]></text>
  65.     <tag>l</tag>
  66.     <description>logical</description>
  67.   </snippet>
  68.   <snippet id="mod">
  69.     <text><![CDATA[module ${1:name}
  70.     implicit none
  71.     ${2:integer/real ::} $3
  72.     
  73.     ${4:contains}
  74.     
  75.     ${0:source}
  76. end module]]></text>
  77.     <tag>mod</tag>
  78.     <description>module</description>
  79.   </snippet>
  80.   <snippet id="op">
  81.     <text><![CDATA[open(${1:unit}, file='${2:name}', status='${3:new}')]]></text>
  82.     <tag>op</tag>
  83.     <description>open</description>
  84.   </snippet>
  85.   <snippet id="prog">
  86.     <text><![CDATA[program ${1:name}
  87.     implicit none
  88.     
  89.     ${0:source}
  90. end program]]></text>
  91.     <tag>prog</tag>
  92.     <description>program</description>
  93.   </snippet>
  94.   <snippet id="re">
  95.     <text><![CDATA[read(unit=${1:*},fmt=${2:*}) $0]]></text>
  96.     <tag>re</tag>
  97.     <description>read</description>
  98.   </snippet>
  99.   <snippet id="r">
  100.     <text><![CDATA[real(kind=${1:8}) :: $0]]></text>
  101.     <tag>r</tag>
  102.     <description>real</description>
  103.   </snippet>
  104.   <snippet id="rda">
  105.     <text><![CDATA[real(kind=${1:8}), dimension(${2::}), allocatable :: $0]]></text>
  106.     <tag>rda</tag>
  107.     <description>realdimalloc</description>
  108.   </snippet>
  109.   <snippet id="rd">
  110.     <text><![CDATA[real(kind=${1:8}), dimension(${2::}) :: $0]]></text>
  111.     <tag>rd</tag>
  112.     <description>realdim</description>
  113.   </snippet>
  114.   <snippet id="rec">
  115.     <text><![CDATA[recursive function ${1:name}( ${2:parameter} ) result( ${3:res} )
  116.     ${4:integer/real ::} $3
  117.     ${5:integer/real ::} $2
  118.     
  119.     ${0:source}
  120.     
  121.     $3 =     !result
  122. end function]]></text>
  123.     <tag>rec</tag>
  124.     <description>recursivfunc</description>
  125.   </snippet>
  126.   <snippet id="sel">
  127.     <text><![CDATA[select case( $1 )
  128.     case( $2 )
  129.         ${3:source}
  130.     case default
  131.         ${0:source}
  132. end select]]></text>
  133.     <tag>sel</tag>
  134.     <description>select</description>
  135.   </snippet>
  136.   <snippet id="sub">
  137.     <text><![CDATA[subroutine ${1:name}( ${2:parameter} )
  138.     ${3:integer/real ::} $2
  139.     
  140.     ${0:source}
  141. end subroutine]]></text>
  142.     <tag>sub</tag>
  143.     <description>subroutine</description>
  144.   </snippet>
  145.   <snippet id="t">
  146.     <text><![CDATA[type :: ${1:name}
  147.     ${2:integer/real ::} $0
  148. end type $1]]></text>
  149.     <tag>t</tag>
  150.     <description>type</description>
  151.   </snippet>
  152.   <snippet id="dow">
  153.     <text><![CDATA[do while( ${1} )
  154.     ${0:source}
  155. end do]]></text>
  156.     <tag>dow</tag>
  157.     <description>while</description>
  158.   </snippet>
  159.   <snippet id="wr">
  160.     <text><![CDATA[write(unit=${1:*},fmt=${2:*}) "$3", $0]]></text>
  161.     <tag>wr</tag>
  162.     <description>write</description>
  163.   </snippet>
  164. </snippets>
  165.